@{
    Layout = null;
}
@using MvcSort.Models;
@model Product;
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新增或者编辑</title>
    <style>
        div {
            border: 1px solid;
            width: 270px;
        }
    </style>
</head>

<body>
    <div>
        <table>
           @if (Model==null)
           {
               <tr hidden>
                <td>id</td>
                <td><input type="text" name="id" id="" value="0"></td>
            </tr>
            <tr>
                <td>商品名称:</td>
                <td><input type="text" name="ProductName" id=""></td>
            </tr>
            <tr>
                <td>供应商名称:</td>
                <td><input type="text" name="Supplier" id=""></td>
            </tr>
            <tr>
                <td>价格:</td>
                <td><input type="text" name="Price" id=""></td>
            </tr>
            <tr>
                <td>库存数量:</td>
                <td><input type="text" name="Stock" id=""></td>
            </tr>
            <tr>
                <td>备注:</td>
                <td><input type="text" name="Remarks" id=""></td>
            </tr>
            <tr>
                <td><input type="button" name="" id="btnbc" value="保存"></td>
                <td><input type="button" name="" id="btnqx" value="取消"></td>
            </tr>

           }
           else
           {
               <tr hidden>
                <td>id</td>
                <td><input type="text" name="id" id="" value="@Model.Id"></td>
            </tr>
            <tr>
                <td>商品名称:</td>
                <td><input type="text" name="ProductName" id="" value="@Model.ProductName"></td>
            </tr>
            <tr>
                <td>供应商名称:</td>
                <td><input type="text" name="Supplier" id="" value="@Model.Supplier"></td>
            </tr>
            <tr>
                <td>价格:</td>
                <td><input type="text" name="Price" id="" value="@Model.Price"></td>
            </tr>
            <tr>
                <td>库存数量:</td>
                <td><input type="text" name="Stock" id="" value="@Model.Stock"></td>
            </tr>
            <tr>
                <td>备注:</td>
                <td><input type="text" name="Remarks" value="@Model.Remarks" ></td>
            </tr>
             <tr>
                <td><input type="button" name="" id="btnbc" value="保存"></td>
                <td><input type="button" name="" id="btnqx" value="取消"></td>
            </tr>
           }
        </table>
    </div>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/js/base.js"></script>
</body>

</html>